package com.qyhl.party.party.supplement;

import com.qyhl.webtv.commonlib.entity.party.PartyLoginBean;
import com.qyhl.webtv.commonlib.entity.party.PartyZoneBean;

import java.util.List;

public class PartySupplementPresenter implements PartySupplementContract.PartySupplementPresenter {
    private PartySupplementContract.PartySupplementView mView;
    private PartySupplementModel mModel;

    public PartySupplementPresenter(PartySupplementContract.PartySupplementView mView) {
        this.mView = mView;
        this.mModel = new PartySupplementModel(this);
    }


    @Override
    public void getCode(String phone) {
        mModel.getCode(phone);
    }

    @Override
    public void getZoneList() {
        mModel.getZoneList();
    }

    @Override
    public void register(String phone, String name, String code, String card, int zoneId, int depId, String polFace, int isWork) {
        mModel.register(phone, name, code, card, zoneId, depId, polFace, isWork);
    }

    @Override
    public void change(String phone, String name, String token, String card, int zoneId, int depId, String polFace, int isWork) {
        mModel.change(phone, name, token, card, zoneId, depId, polFace, isWork);
    }

    @Override
    public void setCode(String msg) {
        mView.setCode(msg);
    }

    @Override
    public void registerSuccess(PartyLoginBean bean) {
        mView.registerSuccess(bean);
    }

    @Override
    public void registerError(String msg) {
        mView.registerError(msg);
    }

    @Override
    public void setZoneList(List<PartyZoneBean> beanList) {
        mView.setZoneList(beanList);
    }

    @Override
    public void setZoneError(String msg) {
        mView.setZoneError(msg);
    }
}
